﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Store/StoreMastePage.Master"  AutoEventWireup="true" CodeBehind="GenerateRequisitionForm.aspx.cs" Inherits="logicunivesityinventorystore.Department.GenerateRequisitionForm" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript" language="javascript">
    function printDiv() {

        var toPrint = document.getElementById("divPrint");
        var printWindow = window.open("", "", 'left=500,right=500,width=500,height=500');
        printWindow.document.write('<center>' + toPrint.innerHTML + '</center>');
        printWindow.document.close();
        printWindow.focus();
        printWindow.print();
        printWindow.close();

    }
   </script>
</asp:Content>
<asp:Content ID="Content6" runat="server" 
    contentplaceholderid="ContentPlaceHolder2">
        <h1>Generate Retrival Form</h1>
   
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div id="divPrint">
    <asp:GridView ID="gvRetrivalDetails" runat="server" AutoGenerateColumns="False" 
            Height="120px" Width="615px" onrowcommand="gvRetrivalDetails_RowCommand">
        <Columns>
            <asp:TemplateField HeaderText="Item Code">
                <ItemTemplate>
                    <asp:LinkButton ID="lbtnItemCode" runat="server" 
                        CommandArgument='<%# Eval("ItemCode") %>' CommandName="Select" 
                        Text='<%# Eval("ItemCode") %>'></asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="Category" HeaderText="Category" />
            <asp:BoundField DataField="Description" HeaderText="Description" />
            <asp:BoundField DataField="NeededQuantity" HeaderText="NeededQuantity" />
            <asp:BoundField DataField="AcutalQuantity" HeaderText="AcutalQuantity" />
            <asp:BoundField DataField="Bin" HeaderText="Bin" />
        </Columns>
    </asp:GridView>
        <br />
       <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
    SelectMethod="getRetrivalList" TypeName="BusinessLogicLayer.RetrivalListManager">
</asp:ObjectDataSource>
        <br />
        <asp:GridView ID="gvItemDetails" runat="server" AutoGenerateColumns="False" 
            Width="614px" Height="137px">
            <Columns>
                <asp:BoundField DataField="RetrivalListID" HeaderText="RetrivalListID" />
                <asp:BoundField DataField="ItemCode" HeaderText="ItemCode" />
                <asp:BoundField DataField="DepartmentName" HeaderText="Department Name" />
                <asp:BoundField DataField="NeededQuantity" HeaderText="Needed Quantity" />
                <asp:TemplateField HeaderText="Actual Quantity">
                    <ItemTemplate>
                        <asp:TextBox ID="txtActualQty" runat="server" 
                            Text='<%# Eval("ActualQuantity") %>'></asp:TextBox>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
        </div>
       <center>
        <asp:Button 
            ID="btnAllocateQuantity" runat="server" Text="Allocate Quantity" CssClass="ButtonStyle" 
            onclick="btnAllocateQuantity_Click" Visible="False" />
     
           <asp:ConfirmButtonExtender ID="btnAllocateQuantity_ConfirmButtonExtender" runat="server" 
               
               ConfirmText="Once Applied Allocated Quantity Cannot Be Changed.Do You want to Proceed?" 
               Enabled="True" TargetControlID="btnAllocateQuantity">
           </asp:ConfirmButtonExtender>
     
        <br />
       </center>       
            &nbsp;&nbsp;&nbsp;
        <asp:Button ID="btnPrint" OnClientClick="printDiv()" runat="server" 
            CssClass="ButtonStyle" Text="Print" onclick="btnPrint_Click" />
         <br />
        
            </asp:Content>













<asp:Content ID="Content7" runat="server" 
    contentplaceholderid="ContentPlaceHolder4">
              
                </asp:Content>














<asp:Content ID="Content8" runat="server" 
    contentplaceholderid="ContentPlaceHolder1">

                </asp:Content>















<asp:Content ID="Content9" runat="server" 
    contentplaceholderid="ContentPlaceHolder6">
                
                </asp:Content>
















<asp:Content ID="Content10" runat="server" 
    contentplaceholderid="ContentPlaceHolder7">
               
                </asp:Content>

















<asp:Content ID="Content11" runat="server" 
    contentplaceholderid="ContentPlaceHolder5">

                </asp:Content>


















